//
//  PerformTableViewCell.m
//  ZAKER
//
//  Created by dllo on 15/8/29.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "PerformTableViewCell.h"

@implementation PerformTableViewCell
-(void)dealloc
{
    
    [_leftMyImage release];
    [_leftTitleLabel release];
    [_rightMyImage release];
    [_rightTitleLabel release];

    [super dealloc];
    
}

- (void)awakeFromNib
{
   
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.leftMyImage = [[[UIImageView alloc]init] autorelease];
        self.leftMyImage.layer.masksToBounds = YES;
        self.leftMyImage.layer.cornerRadius = 5;
       [self.contentView addSubview:_leftMyImage];
        
        
        self.leftTitleLabel = [[[UILabel alloc]init] autorelease];
        _leftTitleLabel.font = [UIFont systemFontOfSize:14 * myHeight];
        _leftTitleLabel.numberOfLines = 0;
        _leftTitleLabel.textAlignment = 1;
        [self.contentView addSubview:_leftTitleLabel];
        
        
        self.rightMyImage = [[[UIImageView alloc]init] autorelease];
        self.rightMyImage.layer.masksToBounds = YES;
        self.rightMyImage.layer.cornerRadius = 5;
        [self.contentView addSubview:_rightMyImage];
        
        
        self.rightTitleLabel = [[[UILabel alloc]init] autorelease];
        _rightTitleLabel.numberOfLines = 0;
        _rightTitleLabel.textAlignment = 1;
        _rightTitleLabel.font = [UIFont systemFontOfSize:14 * myHeight];
        [self.contentView addSubview:_rightTitleLabel];
    }
    
    return self;
    
}


-(void)layoutSubviews
{
    
    [super layoutSubviews];
    
    self.leftMyImage.frame = CGRectMake(10 * myWidth, 5 * myHeight, (self.contentView.frame.size.width - 30 * myWidth) / 2, 150 * myHeight);
    
    self.leftTitleLabel.frame = CGRectMake(10 * myWidth, self.leftMyImage.frame.size.height + 10 * myHeight, (self.contentView.frame.size.width - 50 * myWidth) / 2, 40 * myHeight);
    
    self.rightMyImage.frame = CGRectMake(20 * myWidth +(self.contentView.frame.size.width - 30 * myWidth) / 2 , 5 * myHeight, (self.contentView.frame.size.width - 30 * myWidth) / 2, 150 * myHeight);
    
    self.rightTitleLabel.frame =CGRectMake(20 * myWidth +(self.contentView.frame.size.width - 20 * myWidth) / 2, self.rightMyImage.frame.size.height + 10 * myHeight, (self.contentView.frame.size.width - 50 * myWidth) / 2, 40 * myHeight);
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    
    [super setSelected:selected animated:animated];

}

@end
